package project1;

import java.awt.Dimension;

import java.awt.Rectangle;

import java.awt.event.KeyListener;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.JButton;
import javax.swing.JFrame;

public class Quitter
  extends JFrame
{
  private JButton quitterButton = new JButton();

  public Quitter()
  {
    try
    {
      jbInit();
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
  }

  private void jbInit()
    throws Exception
  {
    this.getContentPane().setLayout( null );
    this.setSize( new Dimension(600, 600) );
    quitterButton.setText("Quitter");
    quitterButton.setBounds(new Rectangle(115, 90, 150, 90));
    this.getContentPane().add(quitterButton, null);
    
    Ecouteur ec = new Ecouteur();
    quitterButton.addMouseListener(ec);
    }

    public class Ecouteur implements MouseListener
    {

    public void mouseClicked(MouseEvent e)
    {
      confirmerQuitter vue = new confirmerQuitter(Quitter.this,"Quitter",true);
      vue.setVisible(true);
    }

    public void mousePressed(MouseEvent e)
    {
    }

    public void mouseReleased(MouseEvent e)
    {
    }

    public void mouseEntered(MouseEvent e)
    {
    }

    public void mouseExited(MouseEvent e)
    {
    }
  }
  
}
